package com.hospital.adapter;

import android.content.Context;
import com.hospital.activity.R;
import wheel.adapters.AbstractWheelTextAdapter;

import java.util.HashMap;
import java.util.List;

/**
 * Created by wangjun on 2015/6/10.
 */
public class HospWheelAdapter extends AbstractWheelTextAdapter {
    private List<HashMap<String, String>> hosList;
    public HospWheelAdapter(Context context, List<HashMap<String, String>>  hosList) {

        super(context, R.layout.hos_holo_layout, NO_RESOURCE);
        setItemTextResource(R.id.hos_name);
        this.hosList = hosList;

    }

    @Override
    protected CharSequence getItemText(int index) {
        return hosList.get(index).get("hospital_name");
    }

    @Override
    public int getItemsCount() {
        return hosList.size();
    }
}
